package com.pubinfo.passbook.api.controller.auth;

import com.alibaba.fastjson.JSON;
import com.pubinfo.passbook.common.model.vo.base.JsonResult;
import com.pubinfo.passbook.common.service.master.TRabbitmqOrgService;
import com.pubinfo.passbook.common.service.master.TRabbitmqPersonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "org")
@Api(tags = "4a组织管理")
@Slf4j

public class OrgController {
  @Autowired
  TRabbitmqOrgService orgService;
  
  @PostMapping("insertOrg")
  @ApiOperation(value = "新增组织")
  public JsonResult<Boolean> insertOrg(@RequestBody String org) {
    
    return JsonResult.success(orgService.insertOrg(JSON.parseObject(org)));
  }
}
